package cn.edu.sgu.www.mhxysy.dto.except;

import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import cn.edu.sgu.www.mhxysy.consts.RegExps;
import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class AccountDTO implements DataTransferObject {

    @ApiModelProperty(value = "ID")
    private String id;

    /**
     * 账号
     */
    @NotBlank(message = "账号" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "账号", required = true)
    private String account;

    /**
     * 安全手机
     */
    @Pattern(regexp = RegExps.PHONE, message = "请输入正确的手机号！")
    @NotBlank(message = "安全手机" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "安全手机", required = true)
    private String phone;
}